/**
 * 
 */
package cn.hbu.zlfw.dic.controller;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.hbu.zlfw.common.util.AjaxResponse;
import cn.hbu.zlfw.common.util.Utility;
import cn.hbu.zlfw.dic.entity.DicSchool;
import cn.hbu.zlfw.dic.entity.DicUserType;
import cn.hbu.zlfw.dic.service.DicSchoolService;
import cn.hbu.zlfw.dic.service.DicUserTypeService;

/**
 * @ClassName: DicQueryController
 * @Description: 字典查询controller
 * @author tiddar
 * @date 2018年8月22日
 *
 */
@Controller("dicQueryController")
@RequestMapping("/dicQuery")
public class DicQueryController {
	@Autowired
	private DicSchoolService dicSchoolService;
	@Autowired
	private DicUserTypeService dicUserTypeService;

	@ResponseBody
	@RequestMapping("/all.action")
	public AjaxResponse all() {
		AjaxResponse result = AjaxResponse.instance();
		List<DicSchool> dicSchools = dicSchoolService.findAll();
		List<DicUserType> dicUserType = dicUserTypeService.findAll();
		Map<String, Object> map = Utility.getMapInstance();
		map.put("dicSchools", dicSchools);
		map.put("dicUserTypes", dicUserType);
		result.setData(map);
		return result;

	}
}
